#!/usr/bin/env python
# _*_coding:utf-8 _*_
__author__ = "Gao"
"""画弧形"""

import math
import pygame
import sys
from pygame.locals import *

pygame.init()

screen = pygame.display.set_mode((600,500))
pygame.display.set_caption("画弧形")

while True:
    for event in pygame.event.get():
        if event.type in (QUIT,KEYDOWN):
            sys.exit()

    screen.fill((0,0,200))

    color = 255,0,255
    pos_x = 0
    pos_y = 0
    position = pos_x,pos_y,200,200    #弧的起点坐标， x、y轴起始坐标，x长度，y长度
    start_angle = math.radians(0)    # 从起点位置逆时针绕0°
    end_angle = math.radians(180)    #  从起点位置逆时针绕180°(半圆)
    width = 5
    pygame.draw.arc(screen,color,position,start_angle,end_angle,width)

    pygame.display.update()